package com.mfcxy.entity;

import javax.validation.constraints.NotNull;

import com.mfcxy.exception.CustomException;
import com.mfcxy.service.IUserService;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.ArrayList;
import java.util.List;

/**
 * mfcxy_user 表实体类
 * 
 * @author mfcxy
 *
 */
public class User {
	private int id;

	@NotEmpty(message = "用户名不能为空")
	private String username;
	@NotEmpty(message = "密码不能小于6位")
	@Length(min = 6 , message="长度要大于6位")
	private String password;
	private String head_portrait = "";
	private String createtime;
	private String updatetime;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getHead_portrait() {
		return head_portrait;
	}

	public void setHead_portrait(String head_portrait) {
		this.head_portrait = head_portrait;
	}

	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	public String getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(String updatetime) {
		this.updatetime = updatetime;
	}


	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", password=" + password + ", head_portrait="
				+ head_portrait + ", createtime=" + createtime + ", updatetime=" + updatetime + "]";
	}

}
